/**
 * mockjs
 * @see: http://mockjs.com/examples.html
 * ThinkPHP 资源控制器: index, read, save, update, delete
 * Laravel 资源控制器: index, show, store, update, destory
 */
 import Mock from 'mockjs'
 import LoginMock from './LoginMock'
 import AuthAdminsMock from './AuthAdminsMock'
 import AuthGroupsMock from './AuthGroupsMock'
 import AuthRulesMock from './AuthRulesMock'
 import SysConfigsMock from './SysConfigsMock'
 import SysNoticesMock from './SysNoticesMock'
 
 
 Mock.setup({
     timeout: '200-600'
 })
 
 // Mock.mock("/api/test", LoginMock.login({}))
 // Mock.mock("/api/test2", (option) => { return LoginMock.login(option) })
 // 登录模块
 Mock.mock("/api/admin/login", (option) => { return LoginMock.login(option) })
 
 // 公共模块
 Mock.mock("/api/admin/menu", (option) => { return AdminsMock.getMenuData(option) })
 Mock.mock("/api/admin/main", (option) => { return AdminsMock.getMainData(option) })
 
 
 // 管理员管理
 Mock.mock(RegExp('/api/admin/auth-admins/index' + ".*"), option => AuthAdminsMock.index(option))
 Mock.mock(RegExp('/api/admin/auth-admins/read' + ".*"), option => AuthAdminsMock.read(option))
 Mock.mock('/api/admin/auth-admins/save', 'post', option => AuthAdminsMock.save(option))
 Mock.mock('/api/admin/auth-admins/update', 'put', option => AuthAdminsMock.update(option))
 Mock.mock(RegExp('/api/admin/auth-admins/delete' + ".*"), 'delete', option => AuthAdminsMock.delete(option))
 
 
 // 权限分组管理
 Mock.mock(RegExp('/api/admin/auth-groups/index' + ".*"), option => AuthGroupsMock.index(option))
 Mock.mock(RegExp('/api/admin/auth-groups/read' + ".*"), option => AuthGroupsMock.read(option))
 Mock.mock('/api/admin/auth-groups/save', 'post', option => AuthGroupsMock.save(option))
 Mock.mock('/api/admin/auth-groups/update', 'put', option => AuthGroupsMock.update(option))
 Mock.mock(RegExp('/api/admin/auth-groups/delete' + ".*"), 'delete', option => AuthGroupsMock.delete(option))
 
 
 // 权限规则管理
 Mock.mock(RegExp('/api/admin/auth-rules/index' + ".*"), option => AuthRulesMock.index(option))
 Mock.mock(RegExp('/api/admin/auth-rules/read' + ".*"), option => AuthRulesMock.read(option))
 Mock.mock('/api/admin/auth-rules/save', 'post', option => AuthRulesMock.save(option))
 Mock.mock('/api/admin/auth-rules/update', 'put', option => AuthRulesMock.update(option))
 Mock.mock(RegExp('/api/admin/auth-rules/delete' + ".*"), 'delete', option => AuthRulesMock.delete(option))
 
 
 // 系统配置管理
 Mock.mock(RegExp('/api/admin/sys-configs/index' + ".*"), option => SysConfigsMock.index(option))
 Mock.mock(RegExp('/api/admin/sys-configs/read' + ".*"), option => SysConfigsMock.read(option))
 Mock.mock('/api/admin/sys-configs/save', 'post', option => SysConfigsMock.save(option))
 Mock.mock('/api/admin/sys-configs/update', 'put', option => SysConfigsMock.update(option))
 Mock.mock(RegExp('/api/admin/sys-configs/delete' + ".*"), 'delete', option => SysConfigsMock.delete(option))
 
 
 // 系统通知管理
 Mock.mock(RegExp('/api/admin/sys-notices/index' + ".*"), option => SysNoticesMock.index(option))
 Mock.mock(RegExp('/api/admin/sys-notices/read' + ".*"), option => SysNoticesMock.read(option))
 Mock.mock('/api/admin/sys-notices/save', 'post', option => SysNoticesMock.save(option))
 Mock.mock('/api/admin/sys-notices/update', 'put', option => SysNoticesMock.update(option))
 Mock.mock(RegExp('/api/admin/sys-notices/delete' + ".*"), 'delete', option => SysNoticesMock.delete(option))